package com.polukeuro.app.model.challenge;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public abstract class Challenge {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected int id;
	@Persistent
	protected Date endDate;
	@Persistent
	protected Date startDate;
	@Persistent
	protected String name;
	@Persistent
	protected ChallengeType type;
	
	public Challenge(){
		super();
		this.id=0;
		this.endDate = new Date();
		this.startDate = new Date();
		this.name="";
		this.type = ChallengeType.DEFAULT;
	}
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public ChallengeType getType() {
		return type;
	}

	public void setType(ChallengeType type) {
		this.type = type;
	}
	
	
	
}
